{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 2,
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "往小猜！再试一次！\n",
      "往小猜！再试一次！\n",
      "猜对了！真棒！\n"
     ]
    }
   ],
   "source": [
    "# 1. hide_card : 0-100,大了，小了\n",
    "# 2. guess_digit : 50\n",
    "count = 0\n",
    "hide_card = int(input(\"hide_card:\"))\n",
    "\n",
    "while True:\n",
    "    guess_digit = int(input(\"猜一猜（0-100）：\"))\n",
    "    # 对比:\n",
    "    if hide_card == guess_digit:\n",
    "        print(\"猜对了！真棒！\")\n",
    "        break\n",
    "    elif guess_digit>hide_card:\n",
    "        print(\"往小猜！再试一次！\")\n",
    "    else:\n",
    "        print(\"往大的猜！\")"
   ],
   "metadata": {
    "collapsed": false
   }
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "outputs": [],
   "source": [],
   "metadata": {
    "collapsed": false
   }
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 2
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython2",
   "version": "2.7.6"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 0
}
